﻿using System;
using System.Collections.Generic;
using Dict.DataModel;
using Dict.Dao;
using Dict;
using Battle.Engine.InputData;
using Battle.Engine;
using Battle.Engine.LogicModel;
public class Actors :Battle.Engine.Interface.IClientData<ProtoBuf.Message.Actor>
{
    public List<FPosition> standPos;
    public string heroid;
    /// <summary>
    /// Id
    /// </summary>
    public long id;
    /// <summary>
    /// 名称
    /// </summary>
    public string name;
    /// <summary>
    /// 简介
    /// </summary>
    public string desc;
    /// <summary>
    /// 资源名称
    /// </summary>
    public string resName;
    /// <summary>
    /// 基础血量
    /// </summary>
    public double hpBase;
    /// <summary>
    /// 技能1
    /// </summary>
    public string SkillId1;
    /// <summary>
    /// 技能2
    /// </summary>
    public string SkillId2;
    /// <summary>
    /// 技能名字1
    /// </summary>
    public string SkillName1;
    /// <summary>
    /// 技能名字2
    /// </summary>
    public string SkillName2;
    /// <summary>
    /// 大招
    /// </summary>
    public string UltSkillId;
    /// <summary>
    /// 阵型中序列
    /// </summary>
    public int formationPositionId;
    //public Dict.Enum.DictElementType elementType;
    
    public ProtoBuf.Message.Actor DataToClientModel()
    {
        ProtoBuf.Message.Actor actor = new ProtoBuf.Message.Actor();

        actor.heroId = this.heroid;
        //var heroDictData = Dict.DictDataManager.Instance.tableHeroDao.GetById(this.heroid);
       
        
        
        return actor;
    }

   

    public void Init(Dict.DataModel.TableHero data,int positionId) 
    {
      
        this.heroid = data.id;
        SetFormation(positionId);
        this.name = TableTextBlo.GetText(data.name);
        //skills = new HeroSkill(data.HeroId.this);
    }

    public void SetFormation(int positionId) 
    {
        if (positionId == 0)
        {
            return;
        }
        this.formationPositionId = positionId;
        this.standPos = new List<FPosition>();
        
    }
   

}


